<?php

namespace Sisesporte\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity
 * @ORM\Table(name="admissao_professor")
 * @ORM\Entity(repositoryClass="Sisesporte\Repository\AdmissaoProfessorRepository")
 */
class AdmissaoProfessor extends UtilsEntity {

    public function __construct($options = null) {
        if (!is_null($options))
            Configurator::configure($this, $options);
    }

    /**
     * @var $sqAdmissaoProfessor
     * @ORM\Column(name="sq_admissao_professor", type="integer", nullable=false)
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $sqAdmissaoProfessor;

    /**
     * @var Sisesporte\Entity\Professor $sqProfessor
     * @ORM\ManyToOne(targetEntity="Sisesporte\Entity\Professor", inversedBy="sq_pessoa")
     * @ORM\JoinColumn(name="sq_professor", referencedColumnName="sq_pessoa")
     */
    protected $sqProfessor;

    /**
     * @var string $coOrgaoAdmissao
     * @ORM\Column(name="co_orgao_admissao", type="text", nullable=false)
     */
    protected $coOrgaoAdmissao;

    /**
     * @var string $noOrgaoAdmissao
     * @ORM\Column(name="no_orgao_admissao", type="text", nullable=false)
     */
    protected $noOrgaoAdmissao;

    /**
     * @var date $dtInicioAdmissao
     * @ORM\Column(name="dt_inicio_admissao", type="date", nullable=false)
     */
    protected $dtInicioAdmissao;

    /**
     * @var date $dtFinalAdmissao
     * @ORM\Column(name="dt_final_admissao", type="date", nullable=false)
     */
    protected $dtFinalAdmissao;

    /**
     * @var datetime $dtAdmissaoOrgao
     * @ORM\Column(name="dt_admissao_orgao", type="datetime", nullable=false)
     */
    protected $dtAdmissaoOrgao;
    
    /**
     * @var boolean $stAtivo
     * @ORM\Column(name="st_ativo", type="boolean", nullable=false)
     */
    protected $stAtivo;

    /**
     * @var integer $nuCargaHoraria
     * @ORM\Column(name="nu_carga_horaria", type="integer", nullable=true)
     */
    protected $nuCargaHoraria;

    /**
     * @var string $txObservacao
     * @ORM\Column(name="tx_observacao", type="text", nullable=true)
     */
    protected $txObservacao;

    /**
     * @var string $inLotacao
     * @ORM\Column(name="in_lotacao", type="text", nullable=false)
     */
    protected $inLotacao;

    public function getInLotacao() {
        return $this->inLotacao;
    }

    public function setInLotacao($inLotacao) {
        $this->inLotacao = $inLotacao;
    }

    public function getSqAdmissaoProfessor() {
        return $this->sqAdmissaoProfessor;
    }

    public function getSqProfessor() {
        return $this->sqProfessor;
    }

    public function setSqProfessor(Professor $sqProfessor) {
        $this->sqProfessor = $sqProfessor;
        return $this;
    }

    public function getCoOrgaoAdmissao() {
        return $this->coOrgaoAdmissao;
    }

    public function setCoOrgaoAdmissao($coOrgaoAdmissao) {
        $this->coOrgaoAdmissao = $coOrgaoAdmissao;
        return $this;
    }

    public function getNoOrgaoAdmissao() {
        return $this->noOrgaoAdmissao;
    }

    public function setNoOrgaoAdmissao($noOrgaoAdmissao) {
        $this->noOrgaoAdmissao = $noOrgaoAdmissao;
        return $this;
    }

    public function getDtInicioAdmissao() {
        return $this->formataDateTimeToDate($this->dtInicioAdmissao);
    }

    public function setDtInicioAdmissao($dtInicioAdmissao) {
        $this->dtInicioAdmissao = $this->formataDateFromDateTime($dtInicioAdmissao);
        return $this;
    }

    public function getDtFinalAdmissao() {
        return $this->formataDateTimeToDate($this->dtFinalAdmissao);
    }

    public function setDtFinalAdmissao($dtFinalAdmissao) {
        $this->dtFinalAdmissao = $this->formataDateFromDateTime($dtFinalAdmissao);
        return $this;
    }

    public function getStAtivo() {
        return $this->stAtivo;
    }

    public function setStAtivo($stAtivo) {
        $this->stAtivo = $stAtivo;
        return $this;
    }

    public function getNuCargaHoraria() {
        return $this->nuCargaHoraria;
    }

    public function setNuCargaHoraria($nuCargaHoraria) {
        $this->nuCargaHoraria = $nuCargaHoraria;
        return $this;
    }

    public function getTxObservacao() {
        return $this->txObservacao;
    }

    public function setTxObservacao($txObservacao) {
        $this->txObservacao = $txObservacao;
        return $this;
    }
    
    public function getDtAdmissaoOrgao() {
        return $this->formataDateTimeToDate($this->dtAdmissaoOrgao);
    }

    public function setDtAdmissaoOrgao($dtAdmissaoOrgao) {
        $this->dtAdmissaoOrgao = $this->formataDateFromDateTime($dtAdmissaoOrgao);
    }

    public function toArray() {
        return array(
            'sqAdmissaoProfessor' => $this->getSqAdmissaoProfessor(),
            'sqProfessor' => $this->getSqProfessor(),
            'coOrgaoAdmissao' => $this->getCoOrgaoAdmissao(),
            'noOrgaoAdmissao' => $this->getNoOrgaoAdmissao(),
            'dtInicioAdmissao' => $this->getDtInicioAdmissao(),
            'dtFinalAdmissao' => $this->getDtFinalAdmissao(),
            'nuCargaHoraria' => $this->getNuCargaHoraria(),
            'txObservacao' => $this->getTxObservacao(),
            'stAtivo' => $this->getStAtivo()
        );
    }

}
